package net.huashitong.ssydt.sdk.task;

import feign.Headers;
import feign.Param;
import feign.QueryMap;
import feign.RequestLine;
import net.huashitong.ssydt.api.PaginationResult;
import net.huashitong.ssydt.api.Result;
import net.huashitong.ssydt.api.task.entity.SsTaskCard;

import java.util.Map;

/**
 * @author <a href="mailto:yhy23456@163.com">huiyang.yu</a>
 * @since 2018.01.15
 */
public interface SsTaskCardRemoteService {

    @RequestLine("GET /task/cards/{id}")
    SsTaskCard selectByPrimaryKey(@Param("id") Long id);

    @RequestLine("GET /task/cards")
    PaginationResult<SsTaskCard> list(@QueryMap Map<String, Object> queryMap);

    @Headers("Content-Type: application/json")
    @RequestLine("POST /task/cards")
    Result<String> saveWithUpdateQuestionCard(SsTaskCard record);

    @Headers("Content-Type: application/json")
    @RequestLine("PUT /task/cards")
    Result<String> updateWithUpdateQuestionCard(SsTaskCard record);

    @RequestLine("DELETE /task/cards/{id}")
    Result<String> deleteWithUpdateQuestionCard(@Param("id") Long id);
}
